#include<iostream>
#include<math.h>
using namespace std;
int main() {
	int i=0,a, b;
	cin >> a;
	while (a > pow(10, i+1 )) {
		i++;
	}
	while (i >= 0) {
		b = a / pow(10, i);
		a = a - b * pow(10, i);
		if (i > 0) {
			cout << b << "   ";
		}
		i--;
	}
	cout << b;
}
